package com.hexacta.hrs.services.feedbacks;

import java.util.Collection;
import java.util.List;

import org.vectrics.employee.Employee;
import org.vectrics.user.Person;

import com.hexacta.hrs.domain.feedback.Feedback;
import com.hexacta.hrs.domain.feedback.FeedbackMotive;
import com.hexacta.hrs.domain.feedback.FeedbackPeriod;
import com.hexacta.hrs.domain.feedback.FeedbackPeriodMentorReport;
import com.hexacta.hrs.domain.feedback.FeedbackPeriodResume;
import com.hexacta.hrs.domain.feedback.FeedbackPeriodResumeByRole;
import com.hexacta.hrs.domain.feedback.Period;

public interface FeedbackPeriodService {

    List<FeedbackPeriodResume> getAllFeedbackPeriodResumes();

    void createActualFeedbackPeriod();

    public FeedbackPeriod findById(Long id);

    boolean validateIfCurrentFeedbackPeriodIsAlreadyCreated();

    /**
     * Guarda Modificaciones del per�odo
     * 
     * @param period
     */
    void update(FeedbackPeriod period);

    public Collection<FeedbackPeriod> matching(FeedbackPeriod period);

    // public List<FeedbackPeriod> findOpenFeedbacks(String role);

    public List<FeedbackPeriod> findOpenFeedbacks(final String role, Period period);

    // public List<FeedbackPeriod> findClosedPeriods(String role);

    public List<FeedbackPeriod> findClosedPeriods(final String role, Period period);

    // public List<FeedbackPeriodRole> getFeedbacksPeriodsRole(List<JobFunction>
    // listFunction, String period);

    public boolean updateClosedFeedbackPeriod(List<FeedbackPeriod> feedbackPeriodList, boolean closed);

    public List<FeedbackPeriod> findByEvaluatedEmployee(final Employee employee);

    // /**
    // * Busca todos los feedbackPeriods que tengan propiedades que matcheen los
    // * par�metros.
    // *
    // * @param evaluated
    // * @param role
    // * @param mentor
    // * @return los feedbacks que matcheen los par�metros
    // */
    // public Collection<FeedbackPeriod> findWith(Employee evaluated,
    // JobFunction role, Employee mentor);

    public FeedbackPeriod findWithFeedback(Feedback feedback);

    public void save(FeedbackPeriod feedbackPeriod);

    public List<FeedbackPeriodResumeByRole> getAllFeedbackPeriodResumesByRole();

    public List<FeedbackPeriodResumeByRole> getAllFeedbackPeriodResumesByRole(String period);

    /**
     * @param periodId
     *            TODO
     * @param signinPersonId
     * @param employeeId
     * @param roleId
     * @param mentorId
     * @return
     */
    Collection<FeedbackPeriod> findFeedbackPeriodsWithCriteria(Period period, Long signinPersonId, Long employeeId,
            String roleId, Long mentorId);

    public FeedbackPeriod createFeedbackPeriodManually(Employee evaluated, Employee evaluator, String project,
            String motive, FeedbackMotive feedbackMotive, Period period, Integer monthsInProject);

    public Collection<FeedbackPeriodMentorReport> getMentorsReport(Person mentor, String period);

    // public String getOpenPeriod();

    public List<FeedbackPeriod> findAllFeedbackPeriodsForLastPeriod();
}
